package com.gmics.unifiq.fragment;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;

import com.gmics.android.R;
import com.gmics.unifiq.MainActivity;
import com.gmics.unifiq.controller.EntityController;
import com.gmics.unifiq.controller.UserFunctions;
import com.gmics.unifiq.entity.Event;
import com.gmics.unifiq.menu.Account;
import com.gmics.unifiq.menu.FAQ;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentTabHost;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

public class EventTab extends Fragment {
	private String[] tabTitle;
	
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {

		View rootView = inflater.inflate(R.layout.event_tab_layout, container,
				false);
		
		tabTitle = getResources().getStringArray(R.array.event_tab_title);
		FragmentTabHost tabHost = (FragmentTabHost) rootView.findViewById(android.R.id.tabhost);
		tabHost.setup(getActivity(), getChildFragmentManager(), R.id.realtabcontent);
		
		for (int i = 0; i < tabTitle.length; i++){
			Bundle b = new Bundle();
			b.putInt("tabPos", i);
			tabHost.addTab(tabHost.newTabSpec(tabTitle[i]).setIndicator(tabTitle[i]),
	                EventFragment.class, b);
		}

		return rootView;
	}
    
}
